<#macro autoForm action controls attributes="">
	<form action="${action}" method="post" ${attributes}>
		<#local keys=controls?keys>
		<table>
		<#list keys as k>
		<tr>
			<td>${k}:</td><td><@createControls k=k type=controls[k]/></td>
		</tr>
		</#list>
		</table>
		<input type="submit"/>
	</form>
</#macro>

<#macro createControls k type>
	<#if type=="string">
		<input name=${k}/>
	<#elseif type=="date">
		<input name=${k} class="datepicker"/>
	</#if>
</#macro>